<template>
  <form
    ref="elForm"
    :rules="rules"
    size="mini"
    label-width="150px"
    label-position="left"
  >
    <el-upload
      class="upload-demo"
      drag
      action="http://localhost:9991/api/tb_project_billing/ExcelDataImport"
      style="width: 90%"
      multiple
      :on-success="Ok"
    >
      <i class="el-icon-upload"></i>
      <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
      <div class="el-upload__tip">只能上传 .xls, .xlsx 文件，且不超过2MB</div>
    </el-upload>
  </form>
</template>
<script>
export default {
  methods: {
    Ok(val) {
      this.$message(val.message);
      this.$router.push("/tb_project_billingList");
    },
  },
};
</script>